package achao.gallary.com.normalgallary;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @author LiuChao
 * @descibe
 * @date 2017/03/15
 * @contact email:450127106@qq.com
 */
public class ImageBean implements Parcelable {
    private String imageUrl;
    private int position;

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public int getPosition() {
        return position;
    }

    public void setPosition(int position) {
        this.position = position;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.imageUrl);
        dest.writeInt(this.position);
    }

    public ImageBean() {
    }

    protected ImageBean(Parcel in) {
        this.imageUrl = in.readString();
        this.position = in.readInt();
    }

    public static final Parcelable.Creator<ImageBean> CREATOR = new Parcelable.Creator<ImageBean>() {
        @Override
        public ImageBean createFromParcel(Parcel source) {
            return new ImageBean(source);
        }

        @Override
        public ImageBean[] newArray(int size) {
            return new ImageBean[size];
        }
    };
}
